package com.cheetah.exceptions;

public enum UserError implements Error {

    ERROR_CODE_200101(200101,"该账号已注册！"),
    ERROR_CODE_200102(200102,"账号不存在或密码错误!"),
    ERROR_CODE_200201(200201,"当前部门下已存在同名部门!"),
    ERROR_CODE_200202(200202,"没有上级部门id!"),
    ERROR_CODE_200203(200203,"部门名称不能为空！"),
    ERROR_CODE_200204(200204,"网络id不能为空！"),
    ERROR_CODE_200205(200205,"此方法不能修改部门长id！"),
    ERROR_CODE_200206(200206,"部门下存在人员，无法删除！"),
    ERROR_CODE_200207(200207,"单次人员查询数量超过限制！"),
    ;

    private String message;

    private int errorCode;


    private UserError(int errorCode, String message){
        this.message = message;
        this.errorCode = errorCode;
    }

    public int getErrorCode(){
        return this.errorCode;
    }

    public String getMessage(){
        return this.message;
    }

    public UserError getErrorEnums(){
        return this;
    }
}
